#ifndef _VEC3F_H_
#define _VEC3F_H_

/** \brief Vector with three float components.
 */
class Vec3f
{
	public:
		float x; /**< \brief x component. */
		float y; /**< \brief y component. */
		float z; /**< \brief z component. */

		/** \brief Initialize Vec3f object with 0.0f, 0.0f, 0.0f as components.
		 */
		Vec3f() 						: x(0), y(0), z(0) { }
		/** \brief Initialize Vec3f object with given components.
		 * \param x0 Initial x component
		 * \param y0 Initial y component
		 * \param z0 Initial z component
		 */
		Vec3f(float x0, float y0, float z0)		: x(x0), y(y0), z(z0) { }

		/** \brief Adds \a b to \a a
		 *
		 * 	Sum of individual vector components, put into \a a.
		 *
		 * 	\param a First vector, stores result
		 * 	\param b Second vector
		 * 	\return \a a
		 */
		friend Vec3f& operator+=(Vec3f& a, Vec3f b);

		/** \brief Vector sum of two Vec3f objects.
		 *
		 * 	Sum of individual vector components.
		 * 
		 * 	\param a First vector
		 * 	\param b Second vector
		 * 	\return Vector sum of \a a and \a b.
		 */
		friend Vec3f operator+(Vec3f a, Vec3f b);

		/** \brief Vector difference of two Vec3f objects.
		 *
		 * 	Subtract first vector's components from second vector's
		 * 	components.
		 * 
		 * 	\param a First vector
		 * 	\param b Second vector
		 * 	\return Vector difference of \a a and \a b.
		 */
		friend Vec3f operator-(Vec3f a, Vec3f b);

		/** \brief Scale Vec3f by scalar factor.
		 *
		 * 	Scale the magnitude of the vector \a v in each dimension by a
		 * 	factor of \a s.
		 * 
		 * 	\param v Vector to scale
		 * 	\param s Scalar factor to scale by
		 * 	\return Vector \a v scaled by a magnitude of \a s.
		 */
		friend Vec3f operator*(Vec3f v, float s);

		/** \brief Scale Vec3f by scalar factor.
		 *
		 * 	Scale the magnitude of the vector \a v in each dimension by a
		 * 	factor of \a s.
		 * 
		 * 	\param v Vector to scale
		 * 	\param s Scalar factor to scale by
		 * 	\return Vector \a v scaled by a magnitude of \a s.
		 */
		friend Vec3f operator*(float s, Vec3f v);

		/** \brief Scale Vec3f by scalar factor.
		 *
		 * 	Scale the magnitude of the vector \a v in each dimension by a
		 * 	factor of 1/\a s.
		 * 
		 * 	\param v Vector to scale
		 * 	\param s Scalar factor to scale by
		 * 	\return Vector \a v scaled by a magnitude of 1/\a s.
		 */
		friend Vec3f operator/(Vec3f v, float s);
};


#endif
